type Conj a = (a->Bool)

vacio :: Conj a
vacio = const False

agregar :: Eq a => a -> Conj a -> Conj a
agregar a conj = (\elem -> conj elem || elem == a)

interseccion :: Conj a -> Conj a -> Conj a
interseccion c1 c2 = (\elem -> c1 elem && c2 elem)

union :: Conj a -> Conj a -> Conj a
union c1 c2 = (\elem -> c1 elem || c2 elem)

primeraAparicion :: a -> [Conj a] -> Int
primeraAparicion elem conjs = head [index | index <- [0..], (conjs !! index) elem]